http://mathworks.com/matlabcentral/fileexchange/61329-new-polygon-clipping-and-offsetting